package parkshop.pmcourse.service;

import java.util.Date;
import java.util.List;

import parkshop.pmcourse.domain.OrderComment;
import parkshop.pmcourse.domain.Orderdetail;
import parkshop.pmcourse.domain.Orders;
import parkshop.pmcourse.domain.Product;
import parkshop.pmcourse.dto.PageBean;
import parkshop.pmcourse.dto.User;

public interface OrdersService {

	void saveOrder(Orders orders, List<Orderdetail> orderdetailList);
	
	PageBean selectAllOrders(int pageNumber);
	
	PageBean selectAllOrdersByUser(int pageIndex,String userType,Long userId);
	PageBean selectSpecificStatusOrdersByUser(int pageIndex,String userType,Long userId,int status);
	
	Orders paying(Long orderId,User user);
	
	Orders deliver(Long orderId);
	Orders received(Long orderId);
	
	Orders getOrderByOrderId(Long id);
	
	float[] getIncomeByDate(int dateType,User user);// 更具用户和日期信息获取一段时期的收益数组，用于绘制表格
	float[] getIncomeBySpecialDate(Date date,int dateType,User user);// 更具用户和日期信息获取一段时期的收益数组，用于绘制表格
	
	Product getOrderProduct(Long orderId);
	
	Orderdetail getOrderDetailByOrderId(Long id);
	
	boolean saveOrderComment(OrderComment comment);
	
	PageBean getOrdersByDate(Date from,Date to,User user,int status);
	
	boolean deleteOrderById(Long orderId);

	
	
	
}
